<%-- 
    Document   : FrEvento
    Created on : 21-11-2013, 09:38:31 AM
    Author     : Duoc
--%>

<%@page import="libreriaTicket.dao.DaoTipoEvento"%>
<%@page import="libreriaTicket.dao.DaoEvento"%>
<%@page import="libreriaTicket.entity.Evento"%>
<%@page import="libreriaTicket.entity.TipoEvento"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <script src="publico/script/jquery.js" type="text/javascript"></script>
        <script src="publico/script/ajax.js" type="text/javascript"></script>
        <script src="publico/script/evento.js" type="text/javascript"></script>
    </head>
    <body>
        <table>
            <tr>
                <td>Nombre</td>
                <td> <input type="text" name="txtNombre" id="txtNombre"/></td>
            </tr>
            <tr>
                <td>Precio</td>
                <td><input type="text" name="txtPrecio" id="txtPrecio"/></td>
            </tr>
            <tr>
                <td>
                    <select id="cboTipoEvento" name="cboTipoEvento">
                        <%
                            ArrayList<TipoEvento> eventos = DaoTipoEvento.sqlSelectAll();

                            for (TipoEvento tipoEvento : eventos) {
                                
                                out.write("<option value="+tipoEvento.getIdTipoEvento()+">");
                                out.write(tipoEvento.getCategoria());
                                out.write("</option>");
                            }


                        %>
                    </select>
                </td>
            </tr>
            <tr>
                <td> <input type="button" name="btnRegistrar"  value="grabar" id="btnRegistrar"/></td>
                <td> <input type="button" name="btnEliminar"  value="Eliminar" id="btnEliminar"/></td>
                <td> <input type="button" name="btnLeerTodo"  value="Leer todo" id="btnLeerTodo"/></td>
            </tr>
        </table>
    </body>
</html>
